<!DOCTYPE html>
<html class="x-admin-sm">
  <head>
    <meta charset="UTF-8">
    <title></title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <link rel="stylesheet" href="__ADMIN__/css/font.css">
    <link rel="stylesheet" href="__ADMIN__/css/xadmin.css">
    <script type="text/javascript" src="__ADMIN__/js/jquery.min.js"></script>
    <script type="text/javascript" src="__ADMIN__/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="__ADMIN__/js/xadmin.js"></script>
    <script type="text/javascript" src="__ADMIN__/js/cookie.js"></script>
    <style>
        .layui-btn+.layui-btn{
            margin-left: 0;
        }
        .layui-table td, .layui-table th
        {
            min-width: 50px !important;
        }
    </style>
  </head>
  
  <body>
    <div class="x-nav">
      <span class="layui-breadcrumb">
        <a><cite>{$nav}</cite></a>
      </span>
      <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
        <i class="layui-icon layui-icon-refresh-3" style="line-height:30px"></i></a>
    </div>
    <div class="x-body x-admin">
        
      <xblock>
        <a href="{:url('apply/applyList')}" class="layui-btn layui-btn-primary">全部</a>
        <a href="{:url('apply/applyList?status=0')}" class="layui-btn layui-btn-primary">未回复</a>
        <a href="{:url('apply/applyList?status=1')}" class="layui-btn layui-btn-primary">已通过</a>
        <a href="{:url('apply/applyList?status=-1')}" class="layui-btn layui-btn-primary">未通过</a>
        
      </xblock>
      <div class="layui-table-body layui-table-main" style="width: 100%;">
      <table class="layui-table layui-form">
        <thead>
          <tr>
            <th>赛事名称</th>
            <th width="80">地区(市、县)</th>
            <th width="80">比赛时间</th>
            <th width="60">客户姓名</th>
            <th width="60">申请人</th>
            <th width="80">申请时间</th>
            <th width="60">处理人</th>
            <th width="80">处理时间</th>
            <th width="100" style="text-align: center;">状态</th>
            <th width="100" style="text-align: center;">操作</th>
        </thead>
        <tbody>
          {volist name="list" id="apply"}
          {php}
          $client = json_decode($apply['client_data'],true);
          {/php}
          <tr>
            <td>{$client.activity}</td>
            <td>{$client.address}</td>
            <td>{$client.activity_time}</td>
            <td>{$client.name}</td>
            <td>{:idToAdminname($apply.add_admin_id)}</td>
            <td>{$apply.add_time|date="Y-m-d",###}</td>
            <td>{:idToAdminname($apply.reply_admin_id)}</td>
            <td>{if condition="$apply.reply_time"}{$apply.reply_time|date="Y-m-d",###}{else /}{/if}</td>
            <td  style="text-align: center;">
            {switch name="apply.status"}
            {case value="0"}<span class="layui-font-blue">未处理</span>{/case}
            {case value="1"}<span class="layui-font-black">已通过</span>{/case}
            {case value="-1"}<span class="layui-font-gray">未通过</span>{/case}
            {/switch}
            </td>
            <td class="td-manage" style="text-align: center;">
              <a title="查看" class="layui-btn layui-btn-normal layui-btn-xs" onclick="x_admin_show('查看详情','{:url('apply/clientReply')}/id/{$apply.id}')" href="javascript:;">
                查看
              </a>
            </td>
          </tr>
          {/volist}
        </tbody>
      </table>
    </div>
      <div class="page">
        <div>
          {$list->render()}
        </div>
      </div>
    </div>

    <script>
      layui.use(['form','layer','jquery'], function(){
        form = layui.form,
        layer = layui.layer
        ,$ = layui.jquery;

        
      });

    </script>
  </body>

</html>